<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>{$title}</title>
    <meta name="description" content="{$share_des}">
    <link rel="stylesheet" href="/static/challenge/css/comman.css">
    <link rel="stylesheet" href="/static/challenge/css/index.css?v=52">
</head>
<body>
<div class="container" id="app">
    <div class="mask"></div>
</div>
<script type="application/javascript" src="/static/challenge/js/rem.js"></script>
<script type="application/javascript" src="/static/challenge/js/jquery-3.1.1.min.js"></script>
<script type="application/javascript" src="/static/challenge/js/index.js?v=52"></script>
<script>
    $(function () {
        window.requestDataUrl = '{$domain}/api/v20/star_activ/getquestion';
        window.requestRankUrl = '{$domain}/api/v20/star_activ/getranking';
        window.defaultAvatar = '/static/challenge/img/avatar-default.png';
        window.rn = {$rn};
        window.shareTitle = '{$share_title}';
        window.shareDes = '{$share_des}';
        window.shareUrl = '{$domain}/{$share_url}';
        var qh = JSON.parse('{:json_encode($header)}');

        if (window.rn) {
            window.app_type = qh['app-type'];
            window.version = qh['version'];
            window.requestHeader = {
                "content-type": "application/x-www-form-urlencoded",
                "app-type": qh['app-type'],
                "version": qh['version'],
                "time": qh['time'],
                "phone-version": qh['phone-version'],
                "did": qh['did'],
                "access-token": qh['access-token'],
                "model": qh['did'],
                "sign": qh['sign'],
            };
        } else {
            window.requestHeader = {};
        }
        // 开始初始化首页
        initHomeHtml($('.mask'));
    })
</script>
<script>
    var cnzz_s_tag = document.createElement('script');
    cnzz_s_tag.type = 'text/javascript';
    cnzz_s_tag.async = true;
    cnzz_s_tag.charset = 'utf-8';
    cnzz_s_tag.src = 'https://w.cnzz.com/c.php?id=1279265750&async=1';
    var root_s = document.getElementsByTagName('script')[0];
    root_s.parentNode.insertBefore(cnzz_s_tag, root_s);
</script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
    wx.config({
        debug: false,
        appId: '{$signPackage.appId}',
        timestamp: {$signPackage.timestamp},
        nonceStr: '{$signPackage.nonceStr}',
        signature: '{$signPackage.signature}',
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage']
    });
    wx.ready(function () {
        wx.onMenuShareAppMessage({
            title: '{$share_title}', // 分享标题
            desc: '{$share_des}', // 分享描述
            link: '{$signPackage.url}', // 分享链接
            imgUrl: 'https://oss.goddessxzns.com/picture/uploads/logo.png?x-oss-process=style/show', // 分享图标
            type: 'link', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });
        wx.onMenuShareTimeline({
            title: '{$share_title}', // 分享标题
            link: '{$signPackage.url}', // 分享链接$signPackage.url
            imgUrl: 'https://oss.goddessxzns.com/picture/uploads/logo.png?x-oss-process=style/show', // 分享图标
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });
    });
</script>
{include file="../apps/web/view/public/sensors.html" /}
</body>
</html>
